find x in a right triangle